]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
telepathyClient: Use a single update for text and timestamp
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 1 Mar 2017 19:01:28 +0000 (20:01 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 1 Mar 2017 19:46:58 +0000 (20:46 +0100)
Commit c6f22826cf added a call to update() to refresh the notification
time for sent and received messages. However as it omits the bannerMarkup
parameter, escaped text like '&apos;' now makes it through verbatim.
Rather than adding the parameter, we can just refresh the timestamp in
the existing update() call to fix the issue - it means the notification
timestamp is only refreshed for received messages, but that reflects
the text shown in the notification, which isn't updated for sent
messages either.

https://bugzilla.gnome.org/show_bug.cgi?id=779435

js/ui/components/telepathyClient.js

index f1fe09f958927fb8f8bce3bbaed8a933806e59af..1cd8e61bdd85cc019b03b22db846af984324d187 100644 (file)
@@ -660,7 +660,9 @@ const ChatNotification = new Lang.Class({
         }
 
         if (message.direction == NotificationDirection.RECEIVED)
-            this.update(this.source.title, messageBody, { bannerMarkup: true });
+            this.update(this.source.title, messageBody,
+                        { datetime: GLib.DateTime.new_from_unix_local (message.timestamp),
+                          bannerMarkup: true });
 
         let group = (message.direction == NotificationDirection.RECEIVED ?
                      'received' : 'sent');
@@ -670,8 +672,6 @@ const ChatNotification = new Lang.Class({
                        styles: styles,
                        timestamp: message.timestamp,
                        noTimestamp: noTimestamp });
-        this.update(this.title, this.bannerBodyText,
-                    { datetime: GLib.DateTime.new_from_unix_local (message.timestamp) });
     },
 
     _filterMessages: function() {